$(function(){
		// var key = getcookie('doutingshop');
		
		// if(key==''){
		// 	location.href = 'login.html';
		// }
		$.ajax({
			type:'post',
			url:ApiUrl+"/user/queryAllAccount",
			dataType:'json',
			//jsonp:'callback',
			success:function(result){
				checklogin(result.rspCode);
				if (result.rspCode==0) {
					console.log(result)
					$('#username').html(result.user.username);
					$('#avatar').attr("src",ApiUrl+'/'+ result.user.portrait);

					$('#yuer').text(result.accounts[0].balance);
					$('#hongbao').text(result.accounts[1].balance);
					$('#youhuiquan').text(result.accounts[2].balance);
				};
				
				return false;
			}
		});
});